<script>
	/**
	 * vuex 主入口
	 */
	import { mapMutations } from 'vuex';
	export default {
		methods: { 
			// ...mapMutations(['login'])
		},
		onLaunch: function() {
			// 微信H5页面禁止分享
			document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
			    WeixinJSBridge.call('hideOptionMenu');
			});
			//TODO 全局引用JS
			/* let scrTag = document.createElement('script');
			scrTag.src='@/static/ydsets/data_prop.json?r=v1.0';
			document.body.appendChild(scrTag);
			console.log("引入类",scrTag); */
		},
		onShow: function() {
			console.log('【YDLogin】OnShow');
		},
		onHide: function() {
			//console.log('App Hide')
		},
		globalData:  {
			systemName:"壹点联盟",
			//H5路径借口-nginx做代理转发
			//H5生产环境,	
			//TODO 生产环境： https://ydapi.plsvcrthcs.top
			//TODO 测试环境： https://jylmapi.szxxhon.com
			//TODO 本地环境： http://192.168.0.105:9010
			//url:'http://192.168.0.105:9010',
			//url:'https://jylmapi.plsvcrthcs.top',
			//url:'https://yidianapi.plsvcrthcs.top',
			url:'https://ydapi.plsvcrthcs.top',
			//url:'https://jylmapi.szxxhon.com',
			furl: 'http://qnyjs.yyxzsh5.zhijianyued.cn/images/',  //cdn加速域名
			smname: uni.getStorageSync('smname') ? uni.getStorageSync('smname') : '...',
			token: uni.getStorageSync('token') ? uni.getStorageSync('token') : '',
			user: uni.getStorageSync('user') ? uni.getStorageSync('user') : {},
			islogin: uni.getStorageSync('islogin') > 0 ? uni.getStorageSync('islogin') : 0,
			version: '1.0.0',
			//TODO 阅读本地配置一个缓存版本号并放本地存起来，接口及时上报
			readerVersion:'1.0.03', 
			preRoute: 'pages/index/index',
			//TODO 调试代码：[微信平台：platformName=wechatMP 和手机端：isWechat=true]
			platformName:"wechatMP",
			isWechat:null,
		},
	}
</script>

<style lang='scss'>
	/*
	*	全局公共样式和字体图标
	*/
	@font-face {
		font-family: yticon;
		font-weight: normal;
		font-style: normal;
	}

	view,
	scroll-view,
	swiper,
	swiper-item,
	cover-view,
	cover-image,
	icon,
	text,
	rich-text,
	progress,
	button,
	checkbox,
	form,
	input,
	label,
	radio,
	slider,
	switch,
	textarea,
	navigator,
	audio,
	camera,
	image,
	video {
		box-sizing: border-box;
	}

	/* button样式改写 */
	uni-button,
	button {
		height: 80upx;
		line-height: 80upx;
		font-size: $font-lg + 2upx;
		font-weight: normal;

		&.no-border:before,
		&.no-border:after {
			border: 0;
		}
	}

	uni-button[type=default],
	button[type=default] {
		color: $font-color-dark;
	}
</style>